class aluControl:

    def oppin(self,function, sigAluOp):
        #print(str(bin(sigAluOp)) + " " + str(bin(function)))
        if (sigAluOp == 0): #add
            self.aluOp = 0b010
        elif(sigAluOp == 1 ): #sub
            self.aluOp = 0b110
        else: 
            if (function & 0b001111 == 0 ): #add
                self.aluOp = 0b010
            elif (function & 0b001111 == 0b0010): #sub
                self.aluOp = 0b110
            elif (function & 0b001111 == 0b0100): #and
                self.aluOp = 0b000  
            elif (function & 0b001111 == 0b0101): #or
                self.aluOp = 0b001  
            elif (function & 0b001111 == 0b1010): #slt
                self.aluOp = 0b111   
            else:
                self.aluOp = 0b110    

    def getAluOp(self):
        #print(self.aluOp)
        return self.aluOp